//------------------------------------------------------------------------------
// <copyright file="TavernHero.cs" company="Damian Antonowicz">
//       copyright © 2010 Damian Antonowicz
// </copyright>
// <author>Damian Antonowicz</author>
// <email>poczta@damianantonowicz.pl</email>
//------------------------------------------------------------------------------

using System;
using System.ComponentModel;

namespace DotBeer.Business.Entities
{
    public class TavernHero : INotifyPropertyChanged
    {
        #region private members

        protected string name;

        #endregion

        #region properties

        public String Name
        {
            get { return this.name; }
            set
            {
                this.name = value;
                this.OnPropertyChanged("Name");
            }
        }

        #endregion

        #region constructors

        public TavernHero()
        {
        }

        #endregion

        #region public methods

        public override string ToString()
        {
            return name;
        }

        #endregion

        #region private methods

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        /// <summary>
        /// Notify that property was changed.
        /// </summary>
        /// <param this.name="info">Changed property this.name</param>
        protected void OnPropertyChanged(string propertyName)
        {
            if (this.PropertyChanged != null)
                this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
        }

        #endregion

        #endregion  
    }
}
